package com.ww.springboot.boot.javabase.proxy.cglib;

import net.sf.cglib.proxy.Enhancer;
import net.sf.cglib.proxy.MethodInterceptor;
import net.sf.cglib.proxy.MethodProxy;

import java.lang.reflect.Method;

/**
 *
 * @author MyComputer
 */
public class CGLibProxyDemo {

    public static void main(String[] args) {
        CGLibProxy cgLibProxy = new CGLibProxy();

        CGLibProxy.ProxyTest proxyTest = new CGLibProxy.ProxyTest();
        proxyTest.setSs("aa");

        CGLibProxy.ProxyTest proyInfo = cgLibProxy.getProyInfo(proxyTest.getClass());
        System.out.println(proyInfo.getSs());

        proyInfo.setSs("bb");
        System.out.println(proyInfo.getSs());
    }

}